package com.ruoyi.stock.domain;

import java.math.BigDecimal;

import com.ruoyi.commodity.domain.MCommodity;
import com.ruoyi.warehouse.domain.MWarehouse;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 库存管理对象 m_stock
 * 
 * @author ruoyi
 * @date 2024-10-25
 */
public class MStock extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 库存表id */
    private Long stockId;

    /** 仓库id */
    @Excel(name = "仓库id")
    private Long warehouseId;

    /** 商品id */
    @Excel(name = "商品id")
    private Long commodityId;

    /** 库存数量 */
    @Excel(name = "库存数量")
    private Long stockQuantity;

    /** 商品总金额 */
    @Excel(name = "商品总金额")
    private BigDecimal stockAmount;

    /** 商品库存价格 */
    @Excel(name = "商品库存价格")
    private BigDecimal stockPrice;

    //仓库
    private MWarehouse mWarehouse;

    //商品
    private MCommodity mCommodity;
    public void setMCommodity(MCommodity mCommodity) {
        this.mCommodity = mCommodity;
    }

    public MCommodity getMCommodity() {
        return mCommodity;
    }


    public void setMWarehouse(MWarehouse mWarehouse) {
        this.mWarehouse = mWarehouse;
    }

    public MWarehouse getMWarehouse() {
        return mWarehouse;
    }

    public void setStockId(Long stockId) 
    {
        this.stockId = stockId;
    }

    public Long getStockId() 
    {
        return stockId;
    }
    public void setWarehouseId(Long warehouseId) 
    {
        this.warehouseId = warehouseId;
    }

    public Long getWarehouseId() 
    {
        return warehouseId;
    }
    public void setCommodityId(Long commodityId) 
    {
        this.commodityId = commodityId;
    }

    public Long getCommodityId() 
    {
        return commodityId;
    }
    public void setStockQuantity(Long stockQuantity) 
    {
        this.stockQuantity = stockQuantity;
    }

    public Long getStockQuantity() 
    {
        return stockQuantity;
    }
    public void setStockAmount(BigDecimal stockAmount) 
    {
        this.stockAmount = stockAmount;
    }

    public BigDecimal getStockAmount() 
    {
        return stockAmount;
    }
    public void setStockPrice(BigDecimal stockPrice) 
    {
        this.stockPrice = stockPrice;
    }

    public BigDecimal getStockPrice() 
    {
        return stockPrice;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("stockId", getStockId())
            .append("warehouseId", getWarehouseId())
            .append("commodityId", getCommodityId())
            .append("stockQuantity", getStockQuantity())
            .append("stockAmount", getStockAmount())
            .append("stockPrice", getStockPrice())
            .toString();
    }
}
